package cn.dancepeak.artcle.mapper;

import cn.dancepeak.article.domain.Article;
import cn.dancepeak.article.domain.ArticleType;
import cn.dancepeak.article.query.ArticleQuery;
import cn.dancepeak.vo.ArticleTypeDateNumVo;
import cn.dancepeak.vo.ArticleTypeNameNumVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticleMapper {
    void insert(Article article);

    void updateById(Article article);

    void deleteById(Long id);

    void deleteByList(List<Long> ids);

    Article selectById(Long id);

    List<Article> list(ArticleQuery articleQuery);

    List<ArticleTypeNameNumVo> getArticleTypeNameNum();

    List<ArticleTypeDateNumVo> getArticleTypeDateNum();

    List<Article> getRelevant(@Param("id") Long id,@Param("articleTag") String articleTag);

    List<Article> getArticleByTypeName(String articleName);

    List<Article> getArticleNameAndArticleStarNum();

    List<Article> getArticleTagAndArticleReadSum();

    void updateReadAddOne(Long id);
}
